/*
 * @Author: 筱洛 3259871097@qq.com
 * @Date: 2025-04-09 18:58:06
 * @LastEditors: 筱洛 3259871097@qq.com
 * @LastEditTime: 2025-04-09 19:50:05
 * @FilePath: \Exam system\src\api\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from 'axios';

const API_BASE_URL = 'http://localhost:8080/api';

export const registerUser = (userData) => {
    return axios.post(`${API_BASE_URL}/auth/register`, userData);
};

export const loginUser = (credentials) => {
    return axios.post(`${API_BASE_URL}/auth/login`, null, {
        params: credentials
    });
};